<template>
  <div id="headpack">
    <div class="left">
      <div class="text">
        <h1>纷羽Shiner</h1>
        <i>fenyushiner</i>
        <div class="items">
          死肥宅真可怕 / 沉迷ACG / 沉迷coding / 双十一生人怎么了<br>
        </div>
        <div class="skills">
          <div v-for="skill in skills" v-bind:key="skill.skill" class="skill">
            <div class="skilltext">{{skill.skill}}</div>
            <div class="progress">
              <el-progress v-bind:percentage="skill.length" v-bind:color="skill.color" :show-text="false"></el-progress>
            </div>
            <br>
          </div>
        </div>
      </div>
    </div>
    <div class="right" v-bind:style="{backgroundImage:'url('+hpic+')'}"></div>
  </div>
</template>
<style lang="scss" scoped>
#headpack {
  padding-top: 5vh;
  padding-left: 5%;
  padding-right: 5%;
  width: 90%;
  height: 90vh;
  .left {
    width: 50%;
    height: 100%;
    float: left;
    background-color: #ffffff;
    @media (max-width: 640px) {
      width: 100%;
    }
    .text {
      padding: 10vh 10%;
      h1 {
        font-size: 35px;
      }
      i {
        font-size: 16px;
        color: #505050;
      }
      .items {
        font-size: 18px;
        color: #0f0f0f;
        padding-bottom: 20px;
      }
      @media (max-width: 640px) {
        h1 {
          font-size: 30px;
        }
        i {
          font-size: 14px;
        }
        .items {
          font-size: 15px;
        }
      }
    }
  }
  .right {
    width: 50%;
    height: 100%;
    float: left;
    background-size: 100% 100%;
    @media (max-width: 640px) {
      display: none;
    }
  }
}
.skills {
  padding: 50px 0;
  .skill {
    .skilltext {
      width: 15%;
      padding-right: 5%;
      text-align: right;
      float: left;
    }
    .progress {
      padding-top: 8px;
      width: 80%;
      float: left;
    }
    @media (max-width: 640px) {
      .skilltext {
        width: 28%;
        padding-right: 10%;
      }
      .progress {
        width: 60%;
      }
    }
  }
}
</style>
<script>
import mixpagepic from '../assets/mixpage.jpg'

export default {
  data() {
    return {
      hpic: mixpagepic,
      skills: [
        {
          skill: 'Java',
          color: '',
          length: 55
        },
        {
          skill: 'NodeJS',
          color: '#f56c6c',
          length: 20
        },
        {
          skill: 'Vue',
          color: '#FA8072',
          length: 35
        },
        {
          skill: '皮',
          color: '#67c23a',
          length: 95,
          pi: true
        }
      ]
    }
  }
}
</script>
